<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <h:head />
    <h:body>
        <ui:composition template="template.xhtml">
            
            <ui:define name="title">
                My Profile
            </ui:define>
            
            <ui:define name="content">
                <!--______________ MAIN CONTENT ______________-->
                <h:form>
                    <h:panelGrid columns="2">
                        <h:outputLabel for="name" value="Name:"/>
                        <h:outputLabel id ="name" value = "#{userBean.user.name}"/>
                                        
                        <h:outputLabel for="surname" value = "Surname:"/>
                        <h:outputLabel id="surname" value="#{userBean.user.surname}"/>
                                        
                        <h:outputLabel for="birthday" value = "Birthday:"/>
                        <h:outputLabel id="birthday" value="#{userBean.user.birthday}">
                            <f:convertDateTime pattern="dd.MM.yyyy"  timeZone="GMT+1"/>
                        </h:outputLabel>
                                                   
                        <h:outputLabel for="phoneNumber" value = "Phone Number:"/>
                        <h:outputLabel id="phoneNumber" value="#{userBean.user.phoneNumber}"/>
                                        
                        <h:outputLabel for="residenceTown" value = "Residence Town:"/>
                        <h:outputLabel id="residenceTown" value="#{userBean.user.residenceTown}"/>
                                        
                        <h:outputLabel for="privacy" value = "Calendar Public:"/>
                        <h:outputLabel id="privacy" value="#{userBean.user.calendarPublic}"/>
                                        
                        <h:outputLabel for="email" value = "Email:"/>
                        <h:outputLabel id="email" value="#{userBean.user.email}"/>
                    </h:panelGrid>
                    <h:panelGrid columns="2">
                        <p:commandButton value="Modify Profile" action="#{userBean.modifyProfile()}"/>
                    </h:panelGrid>
                </h:form>
            </ui:define>
            
        </ui:composition>
    </h:body>
</html>
